﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace DnD.Model
{
  
    class Deck : GameItem
    {
        private EntitySet<CardDeck> _cards;


         public Deck()
        {
            this.Local = true;
            this.Rate = 0;
            this.RateCount = 0;

            _cards = new EntitySet<CardDeck>();
        }

        public Deck(String name, String description, String pictureURL)
        {
            this.Name = name;
            this.Description = description;
            this.PictureURL = pictureURL;
           

            this.Local = true;
            this.Rate = 0;
            this.RateCount = 0;

            _cards = new EntitySet<CardDeck>();
        }

        [Association(Storage = "_cards", OtherKey="DeckID")]
        public EntitySet<CardDeck> Cards
        {
            get { return _cards; }
            set
            {
                _cards.Assign(value);
                OnPropertyChanged();
            }
        }

      

  

       
    }
}

  
